{% extends "base.html" %}

{% block title %}下载报表{% endblock %}

{% block content %}
    <div class="download-box">
        <h2>报表已生成，点击下载：</h2>
        {% for filename in filenames %}
            <a class="download-link" href="{{ url_for('download_file', filename=filename) }}">
                {{ filename }}
            </a>
        {% endfor %}
    </div>

    <style>
        .download-box {
            text-align: center;
            padding: 40px 50px;
            border: 2px dashed #4CAF50;
            border-radius: 12px;
            background-color: #ffffff;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
            max-width: 600px;
            margin: 40px auto;
        }

        .download-box h2 {
            color: #2E8B57;
            margin-bottom: 30px;
        }

        .download-link {
            display: inline-block;
            margin: 10px;
            padding: 10px 20px;
            background-color: #4CAF50;
            color: white;
            text-decoration: none;
            border-radius: 6px;
            transition: background-color 0.3s ease;
        }

        .download-link:hover {
            background-color: #388E3C;
        }
    </style>
{% endblock %}